//------------------------------------------------------------
// Contact.java
//------------------------------------------------------------

public class Contact {
	private String address, telephone_number, fax_number, mobile_number, email_address, homepage;
	private String first_name, last_name, position, department, company_name;
	
	public Contact(String first_name, String last_name, String position, String department, String company_name, String address,
			String telephone_number, String fax_number, String mobile_number, String email_address, String homepage) //contact 객체 생성자
	{
		this.first_name = first_name;
		this.last_name = last_name;
		this.position = position;
		this.department = department;
		this.company_name = company_name;
		this.address = address;
		this.telephone_number = telephone_number;
		this.fax_number = fax_number;
		this.mobile_number = mobile_number;
		this.email_address = email_address;
		this.homepage = homepage;
	}

	public String getAddress() {
		return address;
	}

	public String getCompany_name() {
		return company_name;
	}

	public String getDepartment() {
		return department;
	}

	public String getEmail_address() {
		return email_address;
	}

	public String getFax_number() {
		return fax_number;
	}

	public String getFirst_name() {
		return first_name;
	}

	public String getHomepage() {
		return homepage;
	}

	public String getLast_name() {
		return last_name;
	}

	public String getMobile_number() {
		return mobile_number;
	}

	public String getPosition() {
		return position;
	}

	public String getTelephone_number() {
		return telephone_number;
	}

	public void setAddress(String addr) {
		address = addr;
	}

	public void setCompany_name(String company) {
		company_name = company;
	}

	public void setDepartment(String dep) {
		department = dep;
	}

	public void setEmail_address(String email) {
		email_address = email;
	}

	public void setFax_number(String fnumber) {
		fax_number = fnumber;
	}

	public void setFirst_name(String fname) {
		first_name = fname;
	}

	public void setHomepage(String homep) {
		homepage = homep;
	}

	public void setLast_name(String lname) {
		last_name = lname;
	}

	public void setMobile_number(String mnumber) {
		mobile_number = mnumber;
	}

	public void setPosition(String pos) {
		position = pos;
	}

	public void setTelephone_number(String tnumber) {
		telephone_number = tnumber;
	}

	// ----------------------------------------------
	// 연락처에 대한 간단한 정보를 리턴
	// ----------------------------------------------

	public String toString() {

		return (" 성 : " + last_name + "\n 이름 : " + first_name + "\n\n 직위 : " + position + "\n 부서 : " + department + "\n 회사명 : " + company_name
				+ "\n\n 주소 : " + address + "\n\n 전화번호 : " + telephone_number + "\n 팩스번호 : " + fax_number + "\n 휴대폰번호 : " + mobile_number
				+ "\n\n 이메일 : " + email_address + "\n 홈페이지 : " + homepage);
	}

	public String list() {
		return (" name : " + last_name + "  " + first_name + "    telephone : " + telephone_number);
	}

	// ---------------------------------------------------
	// 연락처에 대한 정보를 파일에 저장할 형태로 바꾸어 리턴
	// GUI에서 저장 버튼 기능 구현할 때 쓰임
	// ---------------------------------------------------
	public String saveContact() {
		return (first_name + "/" + last_name + "/" + position + "/" + department + "/" + company_name + "/" + address + "/" + telephone_number + "/"
				+ fax_number + "/" + mobile_number + "/" + email_address + "/" + homepage);
	}

}
